
layui.use(['layer','laydate'], function(){

    componentSelectInit(
        {
            ctxPath:'',
            tableName:"wn_farm",
            showValueField:"name",
            valueField:"id",
            selectId:"farmId"  ,
            where:""
        }
        ,function(){

        });
});

var wnMachineConsoleGrid =new consoleGrid({table_id:"wnMachine"});
wnMachineConsoleGrid.init();
function wnMachineTableOperate(value){
return "<button type='button' class='btn btn-xs btn-default command-edit' onclick='var t = consoleOpenWindow(\"wnMachine\",\"/console/wn_machine/edit?id="+value+"\",\"编辑\");layer.full(t);'><span class='glyphicon glyphicon-pencil'></span></button> ";
}
function wnMachineLoadParam(params){
params.query=wnMachineQueryString();
return params;
}
function wnMachineQueryString() {
var objQuery = new Object();
    objQuery.licensePlateNumber=$('#licensePlateNumber').val()==''?null:$('#licensePlateNumber').val(); 
     objQuery.buyTime=$('#buyTime').val()==''?null:$('#buyTime').val(); 
     objQuery.modelNumber=$('#modelNumber').val()==''?null:$('#modelNumber').val(); 
     objQuery.brand=$('#brand').val()==''?null:$('#brand').val(); 
     objQuery.farmId=$('#farmId').val()==''?null:$('#farmId').val(); 
 
var queryString = JSON.stringify(objQuery);
return queryString;
}

